package ${prefixPackage}.beans.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * ${tbDesc}修改参数
 *
 * @author ${author}
 * @date ${date}
 */
@Setter
@Getter
@ToString
@ApiModel(value = "${javaNameBig}EditRequest", description = "${tbDesc}修改参数")
public class ${javaNameBig}EditRequest implements Serializable {

<#list columnList as column>
    <#if column.name != 'del_flag'
    && column.name != 'create_time'
    && column.name != 'create_by'
    && column.name != 'create_name'
    && column.name != 'update_time'
    && column.name != 'update_by'
    && column.name != 'create_name'
    && column.name != 'update_name'
    >
    <#if column.isNull == 0>
    @ApiModelProperty(value = "${column.desc}", required = true)
    <#if column.javaType == 'Integer' || column.javaType == 'Long'>
    @NotNull(message = "${column.desc}不能为空")
    </#if>
    <#if column.javaType == 'String'>
    @NotEmpty(message = "${column.desc}不能为空")
    </#if>
    <#if column.javaType == 'Date'>
    @NotNull(message = "${column.desc}不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    </#if>
    <#if column.isNull == 1>
    @ApiModelProperty(value = "${column.desc}")
    <#if column.javaType == 'Integer' || column.javaType == 'Long'></#if>
    <#if column.javaType == 'String'></#if>
    <#if column.javaType == 'Date'>
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    </#if>
    private ${column.javaType} ${column.javaName};

    </#if>
</#list>
}
